package com.candy.homework;

/**
 * @author donglin
 * @Title:
 * @类名: SalariedEmployee
 * @date 2020/7/24
 */
public class SalariedEmployee extends ColEmployee {
    //（2）SalariedEmployee ： ColaEmployee 的子类，拿固定工资的员工。属性：月薪
    double monSalary;

    public SalariedEmployee() {
    }

    public SalariedEmployee(String name,int month,double monSalary) {
        super(name,month);
        this.monSalary = monSalary;
    }



    @Override
    public double getSalary(int month) {
        if(super.month==month){
            return this.monSalary+100;
        }else {
            return this.monSalary;
        }
    }
}
